﻿@using FFF.Test.Entity.FW.View;
@using Microsoft.AspNetCore.Http;
@{
    ViewData["Title"] = "学生表创建界面";
    Layout = null;
    ViewFWUser currentUserInfo = base.Context.Session.GetUserInfo();
}
 <input type="hidden" id="uuid" name="id">


<div data-toggle="topjui-layout" data-options="fit:true">
    <div data-options="region:'center',title:'',fit:true,border:false,bodyCls:'border_right_bottom'">
        <div data-toggle="topjui-tabs" data-options="fit:true,border:false">
            <div title="@L("基本信息")" data-options="iconCls:'fa fa-th'">
                <div class="topjui-fluid">
                    <fieldset>
                        <legend>@L("基本信息")</legend>
                    </fieldset>
                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label"> @L("班级")</label>
                            <div class="topjui-input-block">
                                <input type="hidden" id="myFormclassName" name="className" />
                                <input id="myFormClassGUID" type="text" name="classGUID" data-toggle="topjui-combobox"
                                       data-options="required:false,
                                editable: true,
                                valueField:'id',
                                textField:'text',
                                loader: $.loader.comboxLoader,
                                mode: 'remote',
                                queryParams:
                                {
                                    viewName:'View_Demo_class',
                                    comBoxValueName:'className',
                                    initQuery:$('#myFormclassName').val()
                                }">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("名称")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentName" type="text" name="studentName" data-toggle="topjui-textbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("年龄")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentAge" type="text" name="studentAge" data-toggle="topjui-numberbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("年级")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentGarde" type="text" name="studentGarde" data-toggle="topjui-textbox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("生日")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentBirthday" type="text" name="studentBirthday" data-toggle="topjui-datebox" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("身高")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentHeight" type="text" name="studentHeight" data-toggle="topjui-numberbox" data-options="precision:2,required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("是否VIP")</label>
                            <div class="topjui-input-block">
                                <div data-toggle="topjui-radio">
                                    <input id="myFormStudentIsVip1" type="radio" name="studentIsVip" value="1" label="@L("是")">
                                    <input id="myFormStudentIsVip2" type="radio" name="studentIsVip" value="0" label="@L("否")" checked="checked">
                                </div>
                            </div>
                        </div>
                    </div>

                    @*<div class="topjui-row">
                    <div class="topjui-col-sm12">
                        <label class="topjui-form-label">@L("是否男性")</label>
                        <div class="topjui-input-block">
                            <div data-toggle="topjui-radio">
                                <input id="myFormStudentIsMan1" type="radio" name="IsMan" value="1" label="@L("是")">
                                <input id="myFormStudentIsMan2" type="radio" name="IsMan" value="0" label="@L("否")" checked="checked">
                            </div>
                        </div>
                    </div>
                </div>*@

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生性别")</label>
                            <div class="topjui-input-block">
                                <div data-toggle="topjui-radio">
                                    <input id="myFormIsMan1" type="radio" name="isMan" value="1" label="@L("是")">
                                    <input id="myFormIsMan2" type="radio" name="isMan" value="0" label="@L("否")" checked="checked">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生等级")</label>
                            <div class="topjui-input-block">
                                <input type="text" name="studentLevel" id="myFormStudentLevel"
                                       data-toggle="topjui-combobox"
                                       data-options="
                               valueField:'value',
                               url:'/api/services/app/Enum/GetEnumArray',
                               queryParams:{'enumTypeName':'DemoStudent2StudentLevelEnum','module':'Demo'},
                                        ">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生描述")</label>
                            <div class="topjui-input-block">
                                <input id="myFormStudentDesc" type="text" name="studentDesc" data-toggle="topjui-textarea" data-options="required:false">
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生爱好")</label>
                            <div class="topjui-input-block">
                                <div data-toggle="topjui-checkbox" id="myFormStudentFavor">
                                    <input type="checkbox" id="myFormStudentFavor0" name="studentFavor" value="篮球" label="篮球">
                                    <input type="checkbox" id="myFormStudentFavor1" name="studentFavor" value="足球" label="足球">
                                    <input type="checkbox" id="myFormStudentFavor2" name="studentFavor" value="羽毛球" label="羽毛球">
                                    <input type="checkbox" id="myFormStudentFavor3" name="studentFavor" value="跑步" label="跑步">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生头像")</label>
                            <div class="topjui-input-block">
                                <div class="topjui-col-sm10">
                                    <input type="text" id="myFormStudentStudentHeadUrl" name="studentStudentHeadUrl" data-toggle="topjui-uploadbox"
                                           data-options="editable:false,
                                                   buttonText:'@L("上传图片")',
                                                   accept:'images',
                                                   uploadUrl:'@AppConfigConsts.PicDomain?type=Demo_Student2',
                                                   success:function(result){
                                                        $('#' + this.id).textbox('setValue', '@AppConfigConsts.PicLookDomain'+result.path)
                                                    }">
                                </div>
                                <div class="topjui-col-sm2" style="padding-top:5px;padding-left:10px;cursor:pointer">
                                    <a onclick="$.dm.showPic($('#myFormStudentStudentHeadUrl').val())">预览图片</a>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生自传")</label>
                            <div class="topjui-input-block">
                                <textarea id="myFormStudentMeRemark" name="studentMeRemark" data-toggle="topjui-ueditor" data-options="id:'myFormStudentMeRemark',mode:'simple',height:200"></textarea>
                            </div>
                        </div>
                    </div>

                    <div class="topjui-row">
                        <div class="topjui-col-sm12">
                            <label class="topjui-form-label">@L("学生个人资料")</label>
                            <div class="topjui-input-block">
                                <div class="topjui-col-sm10">
                                    <input type="text" id="myFormStudentFile" name="studentFile" data-toggle="topjui-uploadbox"
                                           data-options="editable:false,
                                                   buttonText:'@L("上传文件")',
                                                   accept:'file',
                                                   uploadUrl:'@AppConfigConsts.PicDomain?type=Demo_Student2',
                                                   success:function(result){
                                                         $('#' + this.id).textbox('setValue', '@AppConfigConsts.PicLookDomain'+result.path)
                                                    }">
                                </div>
                                <div class="topjui-col-sm2" style="padding-top:5px;padding-left:10px;cursor:pointer">
                                    <a onclick="$.ei.donwFile('myFormStudentFile')">下载文件</a>
                                </div>
                            </div>
                        </div>
                    </div>


                </div>
            </div>
            @if (!string.IsNullOrEmpty(base.Context.Request.Query["uuid"]))
            {
                <div title="@L("学生班级")" data-options="iconCls:'fa fa-th',border:true,iframe:true,disabled:false,
                     content:'<iframe src=\'/Demo/DemoStudnet2/DemoStudent2Index?classGUID=@(base.Context.Request.Query["uuid"])&&mode=@(base.Context.Request.Query["mode"])\' scrolling=\'auto\' frameborder=\'0\' style=\'width:100%;height:96%;\'></iframe>'">
                </div>
            }
           
            @*<div title="@L("选填信息")" data-options="iconCls:'fa fa-th'">
            <div class="topjui-fluid">
                <fieldset>
                    <legend>@L("扩展信息")</legend>
                </fieldset>
            </div>
        </div>*@
        </div>
    </div>
</div>

<!--自定义修改,尽量不要改框架的代码,修改全放这里,如果要修改框架代码,尽量在这里写个方法,在框架调用-->
<script>
var demoStudent2Edit={
    queryObj: $.dm.getQueryObj(), // URL的参数
    buInfo: $.dm.getBuInfo(), // 门店信息
    userInfo: $.dm.getUserInfo() // 用户信息
}
</script>

